<a class="icon_new" title="Ajouter un bâtiment" href="<?php echo shRequest::link('administration', 'batiment', 'create')?>">Créer un bâtiment</a>
<?php foreach($batiments as $batiment): ?>
    <table class="liste">
	<thead>
	    <tr>
		<th><?php echo $batiment->intitule ?></th>
		<th class="icon"><a class="edit" title="Modifier ce bâtiment" href="<?php echo shRequest::link('administration','batiment','edit',$batiment->id)?>"></a></th>
		<th class="icon"><a class="delete" title="Supprimer ce bâtiment" href="<?php echo shRequest::link('administration', 'batiment', 'delete',$batiment->id)?>"></a></th>
	    </tr>
	   
	</thead>
	<tbody>
	    <tr>
		<td colspan="3"><a class="icon_new" title="Ajouter une salle" href="<?php echo shRequest::link('administration', 'salle', 'create',$batiment->id)?>">Ajouter une salle</a></td>
	    </tr>
	    <?php foreach($tableaux[$batiment->id] as $salle): ?>
		<tr>
		    <td><?php echo $salle->intitule ?></td>
		    <td class="icon"><a class="edit" title="Modifier la salle" href="<?php echo shRequest::link('administration','salle','edit',$salle->id)?>"></a></td>
		    <td class="icon"><a class="delete" title="Supprime la salle" href="<?php echo shRequest::link('administration','salle','delete',$salle->id)?>"></a></td>
		</tr>
	    <?php endforeach ?>
	</tbody>
    </table>
<?php endforeach ?>